// 书写首页的 css 样式

// 导入公共的 common.less 文件
@import "common";

// body 的样式
body {
  min-width: 320px;
  width: 15rem;
  margin: 0 auto;
  line-height: 1.5;
  font-family: Arial,Helvetica,STHeiTi,sans-serif;
  background: #F2F2F2;
}

ul,ol {
  list-style: none;
}
// 后续的尺寸都需要使用 rem 单位
@baseFont: 50px;
// top-banner 区域
.top-banner {
  position: relative;
  width: 750rem / @baseFont;
  height: 100rem / @baseFont;
  .top-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    img {
      display: block;
      width: 100%;
      height: 100%;
    }
  }
  .close {
    position: absolute;
    left: 0.1rem;
    top: 0.5rem;
    width: (50rem / @baseFont);
    height: (50rem / @baseFont);
    background: url(../images/close.png) no-repeat center center;    
    background-size: (30rem / @baseFont) auto;
  }
}

// header 区域
.header {
  width: (750rem / @baseFont);
  height: (180rem / @baseFont);
  background-color: #ffdb47;
  margin-bottom: 0;
  .header-top {
    display: flex;
    width: (682rem / @baseFont);
    height: (88rem / @baseFont);
    padding: 0 (34rem / @baseFont);
    justify-content: space-between;
    align-items: center;
    .classify {
      img {
        display: block;
        width: (36rem / @baseFont);
        height: (60rem / @baseFont);
      }
    }
    .ad {
      img {
        display: block;
        width: (450rem / @baseFont);
        height: (55rem / @baseFont);
        margin-right: (50rem / @baseFont);
      }
    }
    .login {
      img {
        display: block;
        width: (36rem / @baseFont);
        height: (60rem / @baseFont);
      }
    }
  }
  .search {
    position: relative;
    width: (750rem / @baseFont);
    height: (92rem / @baseFont);
    padding: 0 (24rem / @baseFont);
    box-sizing: border-box;
    a {
      position: absolute;
      top: 0;
      left: (24rem / @baseFont);
      width: (702rem / @baseFont);
      height: (88rem / @baseFont);     
    } 
    i {
      position: absolute;
      left: (42rem / @baseFont);
      top: (26rem / @baseFont);
      width: (36rem / @baseFont);
      height: (36rem / @baseFont);
      background: url(../images/search_btn.png) no-repeat 0 0;
      background-size: (36rem / @baseFont) auto;
    }  
    form {
      display: flex;
      width: (702rem / @baseFont);
      height: (88rem / @baseFont);
      align-items: center;
      input {
        width: (702rem / @baseFont);
        height: (64rem / @baseFont);
        padding: (3rem / @baseFont) (20rem / @baseFont) 0 (65rem / @baseFont);
        border: 0;
        border-radius: (32rem / @baseFont);
        box-sizing: border-box;
        font-size: 0.56rem;
        line-height: (64rem / @baseFont);
      }
    } 
  }
}

// banner 区域
.banner {
  width: (750rem / @baseFont);
  height: (260rem / @baseFont);
  background: url(../images/banner_bg.png) no-repeat 0 0;
  background-size: (750rem / @baseFont) auto;
  .wrapper {
    width: (702rem / @baseFont);
    height: (260rem / @baseFont);
    margin: 0 auto;
    overflow: hidden;
    ul {
      position: relative;
      width: (2000rem / @baseFont);
      height: (260rem / @baseFont);
      margin: 0;
      li {
        position: absolute;
        left: (702rem / @baseFont);
        top: 0;
        width: (702rem / @baseFont);
        height: (260rem / @baseFont);
        border-radius: (24rem / @baseFont);
        overflow: hidden;
        &.current {
          left: 0;
        }
        img {
          width: (702rem / @baseFont);
          height: (260rem / @baseFont);
        }
      }
    }
  }
}

.view {
  width: 100%;
  height: (183rem / @baseFont);
}
.view a {
  float: left;
  width: 33%;
}
.view img {
  display: block;
  width: 100%;

}

// nav 部分
.nav {
  width: (750rem / @baseFont);
  height: (308rem / @baseFont);
  a {
    float: left;
    width: (150rem / @baseFont);
    height: (142rem / @baseFont);
    text-decoration: none;
    color: #666;
    font-size: (22rem / @baseFont);
    img {
      display: block;
      width: (84rem / @baseFont);
      height: (84rem / @baseFont);
      margin: (24rem / @baseFont) (33rem / @baseFont) 0;
    }
    p {
      height: (28rem / @baseFont);
      margin-top: (5rem / @baseFont);
      line-height: (28rem / @baseFont);
      text-align: center;
    }
  }
}

// 猜你喜欢
.like-wrap {
  display: flex;
  flex-direction: column;
  width: (750rem / @baseFont);
  padding-bottom: (200rem / @baseFont);
}

.like-wrap .likes {
  display: flex;
  align-items: center;
  justify-content: center;
  width: (750rem / @baseFont);
  height: (60rem / @baseFont);
  margin: (40rem / @baseFont) 0;
  font-size: (40rem / @baseFont);
}

.s-icon {
  display: inline-block;
  width: (10rem / @baseFont);
  height: (10rem / @baseFont);
  margin: 0 (10rem / @baseFont);
  border-radius: 25px;
  background: #FF5C17;
}

.m-icon {
  display: inline-block;
  width: (15rem / @baseFont);
  height: (15rem / @baseFont);
  margin: 0 (10rem / @baseFont);
  border-radius: 25px;
  background: #FF5C17;
}

.l-icon {
  display: inline-block;
  width: (20rem / @baseFont);
  height: (20rem / @baseFont);
  margin: 0 (10rem / @baseFont);
  border-radius: 25px;
  background: #FF5C17;
}

.like-lists {
  display: flex;
  flex-wrap: wrap;
  width: (750rem / @baseFont);
}

.like-item {
  display: flex;
  flex-direction: column;
  width: 48%;
  margin-right: 2%;
  margin-bottom: (50rem / @baseFont);
  background: #ffffff;
  border-radius: (8rem / @baseFont);
}

.like-item .item-img {
  width: 100%;
  height: (350rem / @baseFont);
  margin: 0 0 (10rem / @baseFont) 0;
}

.like-item .item-title {
  height: (90rem / @baseFont);
  padding: 0 (10rem / @baseFont);
  margin-top: 0;
  margin-bottom: 0;
  font-size: (30rem / @baseFont);
  overflow: hidden;
}

.like-item .item-tag {
  margin: (15rem / @baseFont) 0 0 0;
  padding: 0 (10rem / @baseFont);
  line-height: (12rem / @baseFont);
}

.like-item .item-tag .tag {
  padding: (1.3rem / @baseFont) (8rem / @baseFont);
  border: 1px solid #FFBB00;
  border-radius: (4rem / @baseFont);
  font-size: (25rem / @baseFont);
  background: #FEFBEE;
}

.item-details {
  margin: (15rem / @baseFont) 0;
  padding: 0 (10rem / @baseFont);
}

.item-details .price {
  margin-right: (8.6rem / @baseFont);
  color: #FF4422;
  font-size: (40rem / @baseFont);
  font-weight: bold;
}

.item-details .comment {
  color: #999999;
  font-size: (25rem / @baseFont);
}

// 底部导航
.bottom-bar {
  position: fixed;
  bottom: 0;
  width: (750rem / @baseFont);
}

.must-login {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: (100rem / @baseFont);
  line-height: (100rem / @baseFont);
  padding: 0 (15rem / @baseFont);
  background: #000000;
  opacity: 0.8;
  color: #ffffff;
  font-size: (25rem / @baseFont);
}

.must-login button {
  width: (200rem / @baseFont);
  height: (60rem / @baseFont);
  line-height: (60rem / @baseFont);
  background: #FFDB47;
  color: #000;
  border: none;
  font-weight: bold;
  border-radius: 10px;
}

.bars {
  display: flex;
  width: 100%;
  padding: (10rem / @baseFont) 0 (10rem / @baseFont) 0;
  background: #ffffff;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.bar-item img {
  width: (60rem / @baseFont);
  height: (60rem / @baseFont);
}

.bar-text {
  color: #000000;
  font-size: (25rem / @baseFont);
  text-align: center;
}